// MemoryPool.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Rational.h"

#include <boost/timer.hpp>
#include <boost/progress.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
using namespace boost;

const int ARR = 100;

int _tmain(int argc, _TCHAR* argv[])
{
	{
		progress_timer tm;

		shared_ptr<Rational> array[ARR];

#ifdef _POOL
		Rational::newMemPool();
#endif
		

		for(int j = 0; j < 10000; ++j)
		{
			for(int i = 0; i < ARR; ++i)
			{
				array[i].reset(new Rational);
			}
		}
	}

	getchar();
	return 0;
}

